﻿using Arch.EntityFrameworkCore.UnitOfWork.Collections;
using Common.Lib.Parameter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Lib.Service
{
    public interface IBaseService<TEntity> where TEntity : class
    {
        Task<ApiResponse<TEntity>?> AddAsync(TEntity entity);
        Task<ApiResponse<TEntity>?> UpdateAsync(TEntity entity);
        Task<ApiResponse<TEntity>?> DeleteAsync(int id);
        Task<ApiResponse<TEntity>?> GetFirstOfDefaultAsync(int id);

        Task<ApiResponse<PagedList<TEntity>>?> GetAllAsync(QueryParameter queryParameter);


    }
}
